package com.ys.enume.flow;

public class FlowEnum {
	
	public enum EffectStock {
		NOT_EFFECT("未生效", 0),
		EFFECTED("已生效", 1),
		CANCELD("已生效但作废", 2);
		public String name;
		public Integer value;

		private EffectStock(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
		
		public static Integer getValue(String name) {
			if (name == null) {
				return null;
			} else {
				for (EffectStock e : EffectStock.values()) {
					if (name.equals(e.name)) {
						return e.value;
					}
				}
			}
			return null;
		}
	}
}
